<?php 


class Zend_View_Helper_CurrentUser extends Zend_View_Helper_Abstract{

    private $_currentUser = null;

    public function currentUser(){
        if (!$this->_currentUser) {
            $this->_currentUser = \Engine\Auth\CurrentUser::getData();
            $this->_currentUser->name = iconv('utf-8', 'cp1251', \Engine\Auth\CurrentUser::getData()->getNickName());
        }
        return $this->_currentUser;
    }
}